<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">

</head>
<body>
<h1>后台首页</h1>
<span th:text="${session.sysUser.cnname+','+session.sysUser.roleNames}"></span>
<a href="logout">注销</a>
<ul th:each="roles:${session.sysUser.roles}"><!--循环用户的角色集合-->
    <li th:each="permission:${roles.permissions}"><!--循环角色的权限集合-->
        <span th:if="${permission.parentId == null}" th:text="${permission.name}"></span>
        <span th:if="${permission.parentId != null}">
            <a th:href="${permission.url}" th:text="${'&nbsp;&nbsp;&nbsp;' + permission.name}"></a>
        </span>
    </li>
</ul>
</body>
</html>